using System.Collections.Generic;
using FoodBank.Core.Models;

namespace FoodBank.Core.Services
{
    public interface IProductService
    {
        /// <summary>
        /// Gets the <see cref="Product"/> using the given id.
        /// </summary>
        /// <param name="productId">The product id.</param>
        /// <returns><see cref="Product"/></returns>
        Product GetProduct(int productId);

        /// <summary>
        /// Persists the <see cref="Product"/> entity into the datastore.
        /// </summary>
        /// <param name="product">The product.</param>
        void CreateProduct(Product product);

        /// <summary>
        /// Persists a list of <see cref="Product"/> entities into the datastore.
        /// </summary>
        /// <param name="products">The products.</param>
        void CreateProducts(IEnumerable<Product> products);

        /// <summary>
        /// Checks if the <see cref="Product"/> entity already exists in the datastore.
        /// </summary>
        /// <param name="product">The product.</param>
        /// <returns>True if the <see cref="Product"/> entity already exists, otherwise false.</returns>
        bool Exists(Product product);
    }
}